package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.vo.NameValue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PublicOpinionCaseMapper;
import com.ruoyi.system.domain.PublicOpinionCase;
import com.ruoyi.system.service.IPublicOpinionCaseService;

/**
 * 案例Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-15
 */
@Service
public class PublicOpinionCaseServiceImpl implements IPublicOpinionCaseService 
{
    @Autowired
    private PublicOpinionCaseMapper publicOpinionCaseMapper;

    /**
     * 查询案例
     * 
     * @param id 案例ID
     * @return 案例
     */
    @Override
    public PublicOpinionCase selectPublicOpinionCaseById(Long id)
    {
        return publicOpinionCaseMapper.selectPublicOpinionCaseById(id);
    }

    /**
     * 查询案例列表
     * 
     * @param publicOpinionCase 案例
     * @return 案例
     */
    @Override
    public List<PublicOpinionCase> selectPublicOpinionCaseList(PublicOpinionCase publicOpinionCase)
    {
        return publicOpinionCaseMapper.selectPublicOpinionCaseList(publicOpinionCase);
    }

    /**
     * 新增案例
     * 
     * @param publicOpinionCase 案例
     * @return 结果
     */
    @Override
    public int insertPublicOpinionCase(PublicOpinionCase publicOpinionCase)
    {
        return publicOpinionCaseMapper.insertPublicOpinionCase(publicOpinionCase);
    }

    /**
     * 修改案例
     * 
     * @param publicOpinionCase 案例
     * @return 结果
     */
    @Override
    public int updatePublicOpinionCase(PublicOpinionCase publicOpinionCase)
    {
        return publicOpinionCaseMapper.updatePublicOpinionCase(publicOpinionCase);
    }

    /**
     * 批量删除案例
     * 
     * @param ids 需要删除的案例ID
     * @return 结果
     */
    @Override
    public int deletePublicOpinionCaseByIds(Long[] ids)
    {
        return publicOpinionCaseMapper.deletePublicOpinionCaseByIds(ids);
    }

    /**
     * 删除案例信息
     * 
     * @param id 案例ID
     * @return 结果
     */
    @Override
    public int deletePublicOpinionCaseById(Long id)
    {
        return publicOpinionCaseMapper.deletePublicOpinionCaseById(id);
    }

    @Override
    public List<NameValue> getGroupByIncidentRootsMsg() {
        return publicOpinionCaseMapper.getGroupByIncidentRootsMsg();
    }
}
